<?php

namespace Common\Model;

class OrderInfoModel extends BaseModel {

    protected $trueTableName = 'tb_order_info';

    /**
     * 获取信息
     * @param integer $id ID
     * @return type
     */
    public function getInfoById($id, $returnDeleted = true) {
        $option = [
            'id'=> $id,
        ];
        if(!$returnDeleted)
        {
            $option['isdelete'] = 0;
        }
        $data = $this->field('*')->where($option)->find();        
        return empty($data) ? array() : $data;
    }
}
